package com.lcxw.hxzbapi.service;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.lcxw.hxzbapi.dao.mapper.GiftMapper;
import com.lcxw.hxzbapi.entity.pojo.Gift;

@Component
public class GiftService {

    @Resource
    GiftMapper giftMapper;

    public int deleteByPrimaryKey(Integer id) throws Exception{
        return giftMapper.deleteByPrimaryKey(id);
    }

    public int insert(Gift gift) throws Exception {
      return giftMapper.insert(gift);
    }

    public Gift selectByPrimaryKey(Integer id)throws Exception {
      return giftMapper.selectByPrimaryKey(id);
    }

    public Gift selectByGiftId(Integer giftId)throws Exception {
        return giftMapper.selectByGiftId(giftId);
    }

    public List<Gift> selectAllGift(){
        return giftMapper.selectAllGift();
    }

    public List<Gift> selectAllEnableGift() throws Exception{
        return giftMapper.selectAllEnableGift();
    }

    public int updateByPrimaryKey(Gift gift)throws Exception {
      return giftMapper.updateByPrimaryKey(gift);
    }
}
